.class public final Llt/noframe/gpsfarmguide/import_fields/imports/ImportFieldModel;
.super Ljava/lang/Object;
.source "ImportFieldModel.kt"


# annotations
.annotation system Ldalvik/annotation/SourceDebugExtension;
    value = "SMAP\nImportFieldModel.kt\nKotlin\n*S Kotlin\n*F\n+ 1 ImportFieldModel.kt\nlt/noframe/gpsfarmguide/import_fields/imports/ImportFieldModel\n*L\n1#1,24:1\n*E\n"
.end annotation


# instance fields
.field private final area:D

.field private final coordinatesList:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "Lcom/google/android/gms/maps/model/LatLng;",
            ">;"
        }
    .end annotation
.end field

.field private final id:J

.field private final perimeter:D

.field private final shapeModel:Llt/farmis/libraries/shape_import_android/models/ShapeModel;


# direct methods
.method public constructor <init>(JLlt/farmis/libraries/shape_import_android/models/ShapeModel;)V
    .locals 5

    const-string v0, "shapeModel"

    invoke-static {p3, v0}, Lkotlin/jvm/internal/Intrinsics;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V

    .line 7
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    iput-wide p1, p0, Llt/noframe/gpsfarmguide/import_fields/imports/ImportFieldModel;->id:J

    iput-object p3, p0, Llt/noframe/gpsfarmguide/import_fields/imports/ImportFieldModel;->shapeModel:Llt/farmis/libraries/shape_import_android/models/ShapeModel;

    .line 16
    new-instance p1, Ljava/util/ArrayList;

    invoke-direct {p1}, Ljava/util/ArrayList;-><init>()V

    iput-object p1, p0, Llt/noframe/gpsfarmguide/import_fields/imports/ImportFieldModel;->coordinatesList:Ljava/util/List;

    .line 17
    iget-object p1, p0, Llt/noframe/gpsfarmguide/import_fields/imports/ImportFieldModel;->shapeModel:Llt/farmis/libraries/shape_import_android/models/ShapeModel;

    invoke-virtual {p1}, Llt/farmis/libraries/shape_import_android/models/ShapeModel;->getCoordinates()Ljava/util/List;

    move-result-object p1

    invoke-interface {p1}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object p1

    :goto_0
    invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z

    move-result p2

    if-eqz p2, :cond_0

    invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object p2

    check-cast p2, Llt/farmis/libraries/shape_import_android/intefaces/LatLngInterface;

    .line 18
    iget-object p3, p0, Llt/noframe/gpsfarmguide/import_fields/imports/ImportFieldModel;->coordinatesList:Ljava/util/List;

    new-instance v0, Lcom/google/android/gms/maps/model/LatLng;

    invoke-interface {p2}, Llt/farmis/libraries/shape_import_android/intefaces/LatLngInterface;->getLatitude()D

    move-result-wide v1

    invoke-interface {p2}, Llt/farmis/libraries/shape_import_android/intefaces/LatLngInterface;->getLongitude()D

    move-result-wide v3

    invoke-direct {v0, v1, v2, v3, v4}, Lcom/google/android/gms/maps/model/LatLng;-><init>(DD)V

    invoke-interface {p3, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    goto :goto_0

    .line 20
    :cond_0
    iget-object p1, p0, Llt/noframe/gpsfarmguide/import_fields/imports/ImportFieldModel;->coordinatesList:Ljava/util/List;

    invoke-static {p1}, Llt/farmis/libraries/externalgps/utils/google_m_utils/SphericalUtil;->computeArea(Ljava/util/List;)D

    move-result-wide p1

    const/16 p3, 0x2710

    int-to-double v0, p3

    invoke-static {v0, v1}, Ljava/lang/Double;->isNaN(D)Z

    div-double/2addr p1, v0

    iput-wide p1, p0, Llt/noframe/gpsfarmguide/import_fields/imports/ImportFieldModel;->area:D

    .line 21
    iget-object p1, p0, Llt/noframe/gpsfarmguide/import_fields/imports/ImportFieldModel;->coordinatesList:Ljava/util/List;

    invoke-static {p1}, Llt/farmis/libraries/externalgps/utils/google_m_utils/SphericalUtil;->computeLength(Ljava/util/List;)D

    move-result-wide p1

    invoke-static {v0, v1}, Ljava/lang/Double;->isNaN(D)Z

    div-double/2addr p1, v0

    iput-wide p1, p0, Llt/noframe/gpsfarmguide/import_fields/imports/ImportFieldModel;->perimeter:D

    return-void
.end method


# virtual methods
.method public final getCoordinatesList()Ljava/util/List;
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()",
            "Ljava/util/List<",
            "Lcom/google/android/gms/maps/model/LatLng;",
            ">;"
        }
    .end annotation

    .line 9
    iget-object v0, p0, Llt/noframe/gpsfarmguide/import_fields/imports/ImportFieldModel;->coordinatesList:Ljava/util/List;

    return-object v0
.end method

.method public final getId()J
    .locals 2

    .line 7
    iget-wide v0, p0, Llt/noframe/gpsfarmguide/import_fields/imports/ImportFieldModel;->id:J

    return-wide v0
.end method

.method public final getShapeModel()Llt/farmis/libraries/shape_import_android/models/ShapeModel;
    .locals 1

    .line 7
    iget-object v0, p0, Llt/noframe/gpsfarmguide/import_fields/imports/ImportFieldModel;->shapeModel:Llt/farmis/libraries/shape_import_android/models/ShapeModel;

    return-object v0
.end method
